﻿<%@ Page Language="C#" AutoEventWireup="true" MasterPageFile="~/Master/MasterPage_New.master"  CodeBehind="StatisticsTypeByMonth.aspx.cs" Inherits="HZ.Supervise.Web.Secondphase.Statistics.StatisticsTypeByMonth" Title="药品类型月报表" %>

<%@ Register Src="~/Common/QueryControl.ascx" TagName="QueryControl" TagPrefix="uc1" %>
<%@ Register Src="~/Common/ChartControl.ascx" TagName="ChartControl" TagPrefix="uc2" %>

<asp:Content ID="Content2" ContentPlaceHolderID="ContentPlaceHolder1" runat="Server">
 <script type="text/javascript">
     function displayDIV() {
         if (document.getElementById("tabcontent2").style.display == "none") 
         {
             document.getElementById("tabcontent2").style.display = "block"
             document.getElementById("btnDis").value= "隐藏图表"
         } 
         else 
         {
             document.getElementById("tabcontent2").style.display = "none"
             document.getElementById("btnDis").value = "显示图表"
         }

     }
     function dis(id) {
         document.getElementById("chart1").style.display = "none";
         document.getElementById("chart2").style.display = "none";
         document.getElementById(id).style.display = "block"

     }
 </script>
    <div id="tabnav">
         <ul> 
             <li class="active"><a href ="#">月报</a></li> 
             <li ><a href="StatisticsTypeBySeason.aspx?Y=<%=Tid %>">季报</a></li>
             <li ><a href="StatisticsTypeByYear.aspx?Y=<%=Tid %>">年报</a></li>
        </ul>
        
    </div>
   <input id="btnDis" type="button" value="隐藏图表" class = btn onclick="displayDIV()" /><div>
         &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
         <asp:Label ID="Label1" runat="server" Text="查询："></asp:Label>
         <asp:DropDownList ID="droYear" runat="server" Height="20px" Width="101px">
             <asp:ListItem Selected="True">2010</asp:ListItem>
             <asp:ListItem>2011</asp:ListItem>
             <asp:ListItem>2012</asp:ListItem>
         </asp:DropDownList>
         年<asp:DropDownList ID="droMonth" runat="server" Height="20px" Width="88px">
             <asp:ListItem Value="-1">请选择</asp:ListItem>
             <asp:ListItem>1</asp:ListItem>
             <asp:ListItem>2</asp:ListItem>
             <asp:ListItem>3</asp:ListItem>
             <asp:ListItem Value="4"></asp:ListItem>
             <asp:ListItem>5</asp:ListItem>
             <asp:ListItem>6</asp:ListItem>
             <asp:ListItem>7</asp:ListItem>
             <asp:ListItem>8</asp:ListItem>
             <asp:ListItem>9</asp:ListItem>
             <asp:ListItem>10</asp:ListItem>
             <asp:ListItem>11</asp:ListItem>
             <asp:ListItem>12</asp:ListItem>
         </asp:DropDownList>
         月<asp:Button ID="Button1" runat="server" Text="查询" CssClass="btn" 
             onclick="Button1_Click" />&nbsp;&nbsp;&nbsp;<a href="javascript:dis('chart1')">金额图表</a>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; <a href="javascript:dis('chart2')">数量图表</a></div>
        &nbsp;<div id="tabcontent2" class="importlist"> 
        <asp:Label ID="lblnull" runat="server" Text="无数据" Visible =false ></asp:Label>
                  <div id="chart1">
            <asp:Chart ID="ChartPurchasing" runat="server" BackColor="#D3DFF0" BackGradientStyle="TopBottom"
                BorderWidth="2" BorderColor="26, 59, 105" Width="1100px" Height="370">
                <Legends>
                    <asp:Legend BackColor="Transparent" IsTextAutoFit="true" Name="Default" BackGradientStyle="None"
                        Docking="Right" Alignment="Near">
                    </asp:Legend>
                </Legends>
                <BorderSkin SkinStyle="Emboss"></BorderSkin>
                <ChartAreas>
                    <asp:ChartArea Name="ChartTypePurchasing" BorderColor="64, 64, 64, 64" BackSecondaryColor="Transparent"
                        BackColor="64, 165, 191, 228" ShadowColor="Transparent">
                        <Position Y="3" Height="92" Width="78" X="2"></Position>
                        <AxisY LineColor="64, 64, 64, 64" LabelAutoFitMaxFontSize="8">
                            <LabelStyle Font="Trebuchet MS, 8.25pt, style=Bold" />
                            <MajorGrid LineColor="64, 64, 64, 64" />
                        </AxisY>
                        <AxisX LineColor="64, 64, 64, 64" LabelAutoFitMaxFontSize="8">
                            <LabelStyle Font="Trebuchet MS, 8.25pt, style=Bold" />
                            <MajorGrid LineColor="64, 64, 64, 64" />
                        </AxisX>
                    </asp:ChartArea>
                </ChartAreas>
            </asp:Chart>
        </div>
        <div id="chart2"style="display:none">
            <asp:Chart ID="ChartInStorage" runat="server" BackColor="#D3DFF0" BorderDashStyle="Solid"
                BackGradientStyle="TopBottom" BorderWidth="2" BorderColor="26, 59, 105" Width="1100"
                Height="370">
                <Legends>
                    <asp:Legend BackColor="Transparent" IsTextAutoFit="true" Name="Default" BackGradientStyle="None"
                        Docking="Right" Alignment="Near">
                    </asp:Legend>
                </Legends>
                <BorderSkin SkinStyle="Emboss"></BorderSkin>
                <ChartAreas>
                    <asp:ChartArea Name="ChartTypeStorage" BorderColor="64, 64, 64, 64" BorderDashStyle="Solid"
                        BackSecondaryColor="Transparent" BackColor="64, 165, 191, 228" ShadowColor="Transparent"
                        BackGradientStyle="TopBottom">
                        <Area3DStyle Rotation="10" Inclination="15" WallWidth="0" />
                        <Position Y="3" Height="92" Width="78" X="2"></Position>
                        <AxisY LineColor="64, 64, 64, 64" LabelAutoFitMaxFontSize="8">
                            <LabelStyle Font="Trebuchet MS, 8.25pt, style=Bold" />
                            <MajorGrid LineColor="64, 64, 64, 64" />
                        </AxisY>
                        <AxisX LineColor="64, 64, 64, 64" LabelAutoFitMaxFontSize="8">
                            <LabelStyle Font="Trebuchet MS, 8.25pt, style=Bold" />
                            <MajorGrid LineColor="64, 64, 64, 64" />
                        </AxisX>
                    </asp:ChartArea>
                </ChartAreas>
            </asp:Chart>
        </div>
        
    </div>
    <div>
        <asp:GridView ID="gvwStatisticsType" runat="server" AutoGenerateColumns="False" 
            CellPadding="1" CellSpacing="3" CssClass="mainlist">
            <Columns>
                <asp:TemplateField HeaderText="周数">
                    <ItemTemplate>
                       <span title="<%#HZ.Supervise.Web.Function.GetWeekRange(Eval("WeekOfYear"))%>"> 第 <%#Eval("WeekOfYear")%> 周 </span>
                    </ItemTemplate>
                    
                    <HeaderStyle Width="60px" />
                </asp:TemplateField>
                <asp:TemplateField HeaderText="采购类型">
                    <ItemTemplate>
                    <%#HZ.Supervise.Web.Function.FormatDrugSource(Eval("SortSource"))%>
                    </ItemTemplate>
                    <HeaderStyle Width="60px" />
                </asp:TemplateField>
                <asp:BoundField DataField="PurchaseAmountTotal" HeaderText="采购总金额" 
                    ReadOnly="True" />
                <asp:BoundField DataField="PurchaseCountTotal" HeaderText="采购总数量" 
                    ReadOnly="True" />
                <asp:BoundField DataField="WareHouseAmountTotal" HeaderText="入库总金额" 
                    ReadOnly="True" />
                <asp:BoundField DataField="WareHouseCountTotal" HeaderText="入库总数量" 
                    ReadOnly="True" />
                <asp:BoundField DataField="WareHouseRate" DataFormatString="{0:P}" 
                    HeaderText="入库率" ReadOnly="True" />
   
            </Columns>
        </asp:GridView>
    </div>
    &nbsp;统计：<asp:Label ID="lblCount" runat="server"></asp:Label>
    
</asp:Content>
